home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 60 / 060.d81 / ps viewer (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  5KB  |  153 lines

  1. 11 poke53280,2:poke53281,.:poke650,128
  2. 12 ifx=.thenprintchr$(142)"[147][153]    welcome to the print shop viewer"
  3. 15 ifx=.thenx=1:load"bload.o",8,1
  4. 20 poke56,120:clr:poke2,1:tp$="":rem keep tp here!!!!!
  5. 25 sys828,50759,"text/dot/wipe.o"
  6. 30 sys828,51456,"unpacker"
  7. 35 sys828,32768,"ps.combo2.o"
  8. 37 sys828,49152,"ps ipa"
  9. 39 :
  10. 40 gosub1500:rem define strings & vars
  11. 50 gosub1000:rem read names of images
  12. 55 gosub2000:rem display names for view
  13. 60 gosub2500:rem move highlight and                      select images
  14. 65 ri=cs+(cp-1)*28:tf=.:fl=.
  15. 70 ifa$="[133]"thengosub3000:sys51459:goto60
  16. 75 ifa$="[134]"thengosub5000:sys51459:goto60
  17. 80 ifa$="[135]"thencp=cp+1:ifcp>npthencp=1
  18. 81 ifa$="[135]"thengosub2040:ifnp>1thencs=1
  19. 82 ifa$="[135]"then60
  20. 85 ifa$="[136]"thengosub60000:gosub2100:goto60
  21. 90 sys828,22528,im$(ri):di=ri:gosub4000:goto60
  22. 990 stop
  23. 999 :
  24. 1000 open3,8,3,"ps.names":co=.:np=1
  25. 1005 ni=28
  26. 1010 dim im$(ni),me$(ni)
  27. 1020 fora=1toni
  28. 1030 input#3,im$(a):me$(a)=im$(a)
  29. 1050 ni(np)=ni(np)+1
  30. 1060 b=len(me$(a)):ifb<>16thenme$(a)=me$(a)+left$(sp$,16-b)
  31. 1070 next:close3:return
  32. 1080 :
  33. 1500 tp$="[213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
  34. 1510 si$="[221]                                      [221]"
  35. 1520 di$="[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]"
  36. 1530 bo$="[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
  37. 1540 bt$="[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203][157][148][192]"
  38. 1550 sp$="                "
  39. 1560 cs=1    :rem current selection
  40. 1570 jo=56320:rem joystick port 2
  41. 1580 cp=1    :rem current page
  42. 1990 return
  43. 1999 :
  44. 2000 print"[147][153][146]"tp$si$si$di$;
  45. 2010 fora=1to14:printsi$;:next
  46. 2020 printdi$si$si$si$si$si$bt$;
  47. 2030 fora=217to242:pokea,peek(a)or128:next
  48. 2040 print"[146][158]   astrographics print shop images"
  49. 2050 print"[150]     by doug cummins and loadstar     "
  50. 2060 print"";
  51. 2070 mi=int(ni(cp)/2):rem middle image
  52. 2080 if(np>1)and(cp<>np)thenmi=14
  53. 2085 si=(cp-1)*28:rem starting image                          for current page
  54. 2090 fora=si+1tosi+mi:printtab(1)"][154]"me$(a)"[  ][154]"me$(a+mi)"[":next
  55. 2093 ifsi+14=si+mithen2100
  56. 2096 fora=si+13tosi+mistep-1:print"                                      ":next
  57. 2100 print"[154]number of pages:"np;
  58. 2110 printtab(23)"[154]current page:"cp
  59. 2120 print"f1 [154]- auto mode"
  60. 2130 print"f3 [154]- quick look       [158]crsr keys move "
  61. 2140 print"f5 [154]- next page          [158]highlight"
  62. 2150 print"f7 [154]- quit           [158]return selects it."
  63. 2160 return
  64. 2500 b=cs:ifb>mithenb=b-mi
  65. 2510 print"";:fora=1tob:print:next
  66. 2520 printtab(2);:ifcs>mithenprinttab(19)"->";
  67. 2530 print""me$(si+cs);:poke198,.
  68. 2535 ifcs<mi+1thenprint"[146]<-";
  69. 2540 geta$:gosub2700:ifa$=""then2540
  70. 2545 if(a$=chr$(13))or(a$="[133]")or(a$="[134]")or(a$="[135]")or(a$="[136]")thenreturn
  71. 2550 b=cs:ifb>mithenb=b-mi
  72. 2560 print"";:fora=1tob:print:next
  73. 2570 printtab(2);:ifcs>mithenprinttab(19)"  ";
  74. 2580 print"[154]"me$(si+cs);
  75. 2585 ifcs<mi+1thenprint"  ";
  76. 2590 ifa$=""thencs=cs+1:ifcs>ni(cp)thencs=ni(cp)
  77. 2600 ifa$="[145]"thencs=cs-1:ifcs<1thencs=1
  78. 2610 ifa$=""thencs=cs+mi:ifcs>ni(cp)thencs=cs-mi*2
  79. 2620 ifa$="[157]"thencs=cs-mi:ifcs<1thencs=cs+mi*2
  80. 2640 goto2500
  81. 2700 if(peek(jo)and16)=.thena$=chr$(13):return
  82. 2710 a=(peek(jo)and15):ifa=15thenreturn
  83. 2720 ifa=14thena$="[145]"
  84. 2730 ifa=07thena$=""
  85. 2740 ifa=13thena$=""
  86. 2750 ifa=11thena$="[157]"
  87. 2760 return
  88. 2990 rem display the images starting at          ri (which is where the high-
  89. 2991 rem light is currently at) and              ending with the last image
  90. 3000 fordi=ritoni:tf=1
  91. 3010 sys828,22528,im$(di)
  92. 3012 gosub4000:rem plot ps image
  93. 3020 poke249,224:poke250,204:sys50765:ifa$="q"ora$="[209]"thenreturn
  94. 3030 fl=1:next:ifri=1thenreturn:rem if       ri=1 we started at the beginning
  95. 3035 rem display the images starting             at 1 and ending at ri - 1
  96. 3040 fordi=1tori-1:tf=1
  97. 3050 sys828,22528,im$(di)
  98. 3060 gosub4000:rem plot ps image
  99. 3070 poke249,224:poke250,204:sys50765:ifa$="q"ora$="[209]"thenreturn
  100. 3080 fl=1:next:return
  101. 4000 iffl=.thenpoke249,224:poke250,204:sys51459:sys50765
  102. 4007 n$=im$(di):poke53270,200:sys50759,n$,(240-len(n$)*8/2),64
  103. 4008 n$="crafted by":sys50759,n$,200,80
  104. 4009 n$="doug cummins":sys50759,n$,192,96
  105. 4012 :
  106. 4030 r=148:cq%=1
  107. 4031 open2,8,2,"g-"+im$(di)
  108. 4033 get#2,a$:get#2,a$
  109. 4035 forx=1to6:sys49152,2,40
  110. 4036 iftp$=""then4038
  111. 4037 sys50759,tp$,8,r
  112. 4038 r=r+8
  113. 4040 next:close2
  114. 4050 poke53270,200
  115. 4052 poke33057,8:poke33058,212:sys32776
  116. 4055 poke33057,8:poke33058,1:sys32768
  117. 4060 sys50759,"press a key",202,128:iftf=1thensys50759,"[q to quit]",202,128
  118. 4062 poke198,.
  119. 4065 geta$:gosub2700:ifa$=""then4065
  120. 4070 iftf=.thensys51459
  121. 4080 return
  122. 5000 px=.:py=.:tf=1:poke249,224:poke250,204:sys51459:sys50765:poke53270,200
  123. 5010 gosub7000
  124. 5050 forx=1toni:sys828,22528,im$(x)
  125. 5060 poke53270,200:poke33057,py:poke33058,px:sys32776
  126. 5070 px=px+45:ifpx>224thenpx=.:py=py+46
  127. 5080 geta$:ifa$="q"ora$="[209]"thenreturn
  128. 5090 fl=.:ifx/20=int(x/20)thengosub6000:iffl=1thenreturn
  129. 5100 next:fl=1:syste,"[press a key]",118,188
  130. 5110 poke198,.:wait198,1:return
  131. 5120 :
  132. 6000 syste,"[press a key]",118,188
  133. 6010 poke198,.:wait198,1:geta$:poke198,.:ifa$="q"ora$="[209]"thenfl=1:return
  134. 6020 poke249,224:poke250,204:sys50765
  135. 6030 gosub7000:px=.:py=.:return
  136. 7000 te=50759:syste,"print shop",244,40:syste,"is a",268,48
  137. 7010 syste,"trademark",244,56
  138. 7020 syste,"of",276,64:syste,"broderbund",244,72
  139. 7030 syste,"software",252,80:syste,"q to quit",244,110
  140. 7040 return
  141. 60000 print"[146]";
  142. 60010 fora=1to2:print"                                      ":next
  143. 60020 print"[154] are you sure you want to quit? (y[154]/n[154])":poke198,.
  144. 60030 fora=1to2:print"                                      ":next
  145. 60040 a=peek(203):ifa<>25anda<>39then60040
  146. 60050 ifa=39thenreturn
  147. 60060 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  148. 60070 ifer<>63thenprint"";:poke198,.:end
  149. 60075 poke53281,0
  150. 60080 print"[147][144]load"chr$(34)"hello connect"chr$(34)",8"
  151. 60090 print"run"
  152. 60095 poke631,13:poke632,13:poke198,2:end
  153.